package com.derbtec.refale.activities; 
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

import com.derbtec.refale.R;
 
@SuppressWarnings("deprecation")
public class MainTabActivity extends TabActivity {

	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TabHost tabHost = getTabHost();
 
        // Tab for Photos
        TabSpec allEventsSpec = tabHost.newTabSpec("AllEvents");
        // setting Title and Icon for the Tab
        allEventsSpec.setIndicator("All Events", getResources().getDrawable(R.drawable.icon_photos_tab));
        Intent photosIntent = new Intent(this, TabGroup1Activity.class);
        allEventsSpec.setContent(photosIntent);
 
        // Tab for Songs
        TabSpec myEventsSpec = tabHost.newTabSpec("MyEvents");
        myEventsSpec.setIndicator("My Events", getResources().getDrawable(R.drawable.icon_songs_tab));
        Intent songsIntent = new Intent(this, TabGroup2Activity.class);
        myEventsSpec.setContent(songsIntent);
 
        // Tab for Videos
        TabSpec newEventSpec = tabHost.newTabSpec("NewEvent");
        newEventSpec.setIndicator("New Event", getResources().getDrawable(R.drawable.icon_videos_tab));
        Intent videosIntent = new Intent(this, TabGroup3Activity.class);
        newEventSpec.setContent(videosIntent);
 
        // Adding all TabSpec to TabHost
        tabHost.addTab(allEventsSpec); // Adding photos tab
        tabHost.addTab(myEventsSpec); // Adding songs tab
        tabHost.addTab(newEventSpec); // Adding videos tab
    }
}